<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Generator" content="ECSHOP v4.0.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Keywords" content="ECSHOP演示站">
<meta name="Description" content="ECSHOP演示站">
<title>ECSHOP演示站 - Powered by ECShop</title>
<base href="__ROOT__/home/">
<link rel="shortcut icon" href="http://localhost/dayi/ecshopceshi/ecshop/favicon.ico">
<link rel="icon" href="http://localhost/dayi/ecshopceshi/ecshop/animated_favicon.gif" type="image/gif">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="alternate" type="application/rss+xml" title="RSS|ECSHOP演示站 - Powered by ECShop" href="http://localhost/dayi/ecshopceshi/ecshop/feed.php">
<link rel="stylesheet" type="text/css" href="css/swiper.css">
<script language="javascript" src="js/swiper.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="js/common.js"></script><script type="text/javascript" src="js/index.js"></script></head>
<body>
<style>
    td{
      align-text:center;
    }
</style>
<script type="text/javascript">
var process_request = "正在处理您的请求...";
</script>
<div class="top-bar">
  <div class="fd_top fd_top1">
    <div class="bar-left">
          <div class="top_menu1"> <!-- <script type="text/javascript" src="js/transport.js"></script><script type="text/javascript" src="js/utils.js"></script>  -->
          <font id="ECS_MEMBERZONE"><div id="append_parent"></div>
              欢迎光临本店<a href="{:url('login/login')}">
              <?php 
                 use think\Session;
                 $user_info = session::get("user_info");
                 if(!empty($user_info)){
                    echo $user_info['user_name'];
                 }else{
                    echo "登录";
                 }
                           
               ?><strong></strong></a>
              &nbsp;|&nbsp;&nbsp;
              <a href="{:url('login/login')}">登录</a> 
              <a href="{:url('login/reg')}">免费注册</a> 
          </font> </div>
    </div>
    <div class="bar-cart">
      <div class="fl cart-yh">
        <a href="{:url('user/welcome')}" class="">用户中心</a>
      </div>
             <div class="cart" id="ECS_CARTINFO"> <a href="{:url('shopcar/car')}" title="查看购物车">购物车</a> </div>
    </div>
  </div>
</div>

   
<div class="clear0 "></div>

<div class="block box">
 <div id="ur_here">
  <div class="path"><div>当前位置: <a href="{:url('index/index')}">首页</a> <code>&gt;</code> 购物流程</div></div> </div>
</div>

<div class="blank"></div>
<div class="block">
    
  
  <script type="text/javascript" src="images/showdiv.js.下载"></script>  <script type="text/javascript">
      var user_name_empty = "请输入您的用户名！";
      var email_address_empty = "请输入您的电子邮件地址！";
      var email_address_error = "您输入的电子邮件地址格式不正确！";
      var new_password_empty = "请输入您的新密码！";
      var confirm_password_empty = "请输入您的确认密码！";
      var both_password_error = "您两次输入的密码不一致！";
      var show_div_text = "请点击更新购物车按钮";
      var show_div_exit = "关闭";
    </script>
  <div class="flowBox">
    <h6><span>商品列表</span></h6>
        <form id="formCart" name="formCart" method="post" action="{:url('shopcar/car_add')}">
           <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tbody><tr>
              <th bgcolor="#ffffff">商品名称</th>
                    <th bgcolor="#ffffff">属性</th>
                                          <th bgcolor="#ffffff">市场价</th>
                            <th bgcolor="#ffffff">本店价</th>
              <th bgcolor="#ffffff">购买数量</th>
              <th bgcolor="#ffffff">小计</th>
              <th bgcolor="#ffffff">操作</th>
            </tr>
            {volist name="res" id="v"}
                        <tr>
              <td bgcolor="#ffffff" align="center">
                    <a href="http://localhost/dayi/ecshopceshi/ecshop/goods.php?id=72" target="_blank"><img src="__ROOT__/uploads/{$v.goods_img}" border="0" title="{$v.goods_name}" width="100"></a><br>
                    <a href="http://localhost/dayi/ecshopceshi/ecshop/goods.php?id=72" target="_blank" class="f6">{$v.goods_name}</a>
                                                                                    </td>
                            <td bgcolor="#ffffff"></td>
                      <td align="right" bgcolor="#ffffff">￥<span class="goods_price_class">{$v.goods_price}</span>元</td>
                            <td align="right" bgcolor="#ffffff">￥<span class="market_price">{$v.market_price}</span>元</td>
              <td align="right" bgcolor="#ffffff">

                                <input type="text" name="goods_number" id="goods_number_44" value="{$v.car_num}" size="4"  class="inputBg" style="text-align:center ">
                              </td>
               <input type="hidden" id="goods_id" value="{$v.goods_id}"/>

              <td align="right" bgcolor="#ffffff">￥<span class="smallplan_price">{$v.market_price*$v.car_num}</span>元
               
              </td>
              <td align="center" bgcolor="#ffffff">
                <a href="{:url('shopcar/delgoods')}?goods_id={$v.goods_id}" class="f6">删除</a>
                            </td>
            </tr>
            {/volist}
                      </tbody></table>
          <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tbody><tr>
              <td bgcolor="#ffffff" class="num_count">
                            购物金额小计 ￥<span id="count">{$count}</span>元，比市场价 ￥<span id="t">{$goods_count}</span>元 节省了 ￥<span id="save_price">{$save_price}</span>元</td>
              <td align="right" bgcolor="#ffffff">
              <button class="bnt_blue_1"><a href="{:url('shopcar/delall')}" style="color:#FFF">清空购物车</a></button>
                     
              </td>
            </tr>
          </tbody></table>
          <input type="hidden" name="step" value="update_cart">
        </form>
        <table width="99%" align="center" border="0" cellpadding="5" cellspacing="0" bgcolor="#dddddd">
          <tbody><tr>
            <td bgcolor="#ffffff"><a href="{:url('index/index')}"><img src="images/continue.gif" alt="continue"></a></td>
            <td bgcolor="#ffffff" align="right"><a href="{:url('shopcar/checkout')}"><img src="images/checkout.gif" alt="checkout"></a></td>
          </tr>
        </tbody></table>
       
    </div>
    <div class="blank5"></div>
  
  
  

        
        
                



</div>
<div class="blank5"></div>


<div class="blank"></div>
<div class="foot-body">
  <div class="bads"><img src="images/bottom.jpg"></div>
  <div class="clear10"></div>
  
     <div class="foot-help">
                      <dl>
          <dt class="xs-1">新手上路 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=9" target="_blank" title="售后流程">售后流程</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=10" target="_blank" title="购物流程">购物流程</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=11" target="_blank" title="订购方式">订购方式</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-2">手机常识 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=12" target="_blank" title="如何分辨原装电池">如何分辨原装电池</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=13" target="_blank" title="如何分辨水货手机 ">如何分辨水货手机</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=14" target="_blank" title="如何享受全国联保">如何享受全国联保</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-3">配送与支付 </dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=15" target="_blank" title="货到付款区域">货到付款区域</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=16" target="_blank" title="配送支付智能查询 ">配送支付智能查询</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=17" target="_blank" title="支付方式说明">支付方式说明</a></dd>
           
        </dl>
         
                        <dl>
          <dt class="xs-4">会员中心</dt>
                      <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=18" target="_blank" title="资金管理">资金管理</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=19" target="_blank" title="我的收藏">我的收藏</a></dd>
                    <dd><a href="http://localhost/dayi/ecshopceshi/ecshop/article.php?id=20" target="_blank" title="我的订单">我的订单</a></dd>
           
        </dl>
         
                 
                 
         
        <div class="foot-weixin">
          <div class="weixin-txt">关注demo微信</div>
          <div class="weixin-pic">
            <img src="images/weixin.jpg">
          </div>
        </div>
    </div>
     
    
   
  
  <div class="blank"></div>
  
<div class="footer_info"> © 2005-2018 ECSHOP 版权所有，并保留所有权利。       <br>
      <a href="http://xyunqi.com/products/ecshop?from=nav" target="_blank" style=" font-family:Verdana; font-size:11px;">Powered&nbsp;by&nbsp;<strong><span style="color: #3366FF">ECShop</span>&nbsp;<span style="color: #FF9966">v4.0.0</span></strong></a>&nbsp;<a href="http://www.ecshop.com/license.php?product=ecshop_b2c&amp;url=http%3A%2F%2Flocalhost%2Fdayi%2Fecshopceshi%2Fecshop%2F" target="_blank">&nbsp;&nbsp;Licensed</a><br>
            <div>ICP备案证书号:<a href="http://www.miibeian.gov.cn/" target="_blank"></a></div>
    </div>
  <div class="clear10"></div>
</div>
 

 


<script type="text/javascript">
var process_request = "正在处理您的请求...";
var username_empty = "- 用户名不能为空。";
var username_shorter = "- 用户名长度不能少于 3 个字符。";
var username_invalid = "- 用户名只能是由字母数字以及下划线组成。";
var password_empty = "- 登录密码不能为空。";
var password_shorter = "- 登录密码不能少于 6 个字符。";
var confirm_password_invalid = "- 两次输入密码不一致";
var email_empty = "- Email 为空";
var email_invalid = "- Email 不是合法的地址";
var agreement = "- 您没有接受协议";
var msn_invalid = "- msn地址不是一个有效的邮件地址";
var qq_invalid = "- QQ号码不是一个有效的号码";
var home_phone_invalid = "- 家庭电话不是一个有效号码";
var office_phone_invalid = "- 办公电话不是一个有效号码";
var mobile_phone_invalid = "- 手机号码不是一个有效号码";
var msg_un_blank = "* 用户名不能为空";
var msg_un_length = "* 用户名最长不得超过7个汉字";
var msg_un_format = "* 用户名含有非法字符";
var msg_un_registered = "* 用户名已经存在,请重新输入";
var msg_can_rg = "* 可以注册";
var msg_email_blank = "* 邮件地址不能为空";
var msg_email_registered = "* 邮箱已存在,请重新输入";
var msg_email_format = "* 邮件地址不合法";
var msg_blank = "不能为空";
var no_select_question = "- 您没有完成密码提示问题的操作";
var passwd_balnk = "- 密码中不能包含空格";
var username_exist = "用户名 %s 已经存在";
var compare_no_goods = "您没有选定任何需要比较的商品或者比较的商品数少于 2 个。";
var btn_buy = "购买";
var is_cancel = "取消";
var select_spe = "请选择商品属性";

function checkIpt(item){
  var val = item.value;
  var method = document.getElementById('payMethod');
  if(val == 'wxpay'){
    method.innerHTML = '微&nbsp;&nbsp;&nbsp;信';
  }else{
    method.innerHTML = '支付宝';
  }
  document.getElementById('yunqi_payment').click();
}
</script>

</body>
<script src="./js/jquery-2.1.4.min.js"></script>
<script>
$(document).on('blur','.inputBg',function(){
// alert(1)
  _this=$(this);
  goods_id=$(this).parent().next().val();
   goods_number_44=$(this).val();

  var market_price=$(this).parent().prev().children('span').html();
   smallplan_price=goods_number_44*market_price;
  _this.parent().next().next().children('span').html(smallplan_price);
  var num=0;
  var goods_count=0;
      $(".smallplan_price").each(function(){
           num += parseInt($(this).text());
      });
      $(".goods_price_class").each(function(){
        goods_count+=parseInt($(this).text())*($(this).parent().next().next().children().val());
      })

      $('#count').html(num);
      var difference=num-goods_count;
      $('.num_count').html('购物金额小计 ￥<span id="count">'+num+'</span>元,比市场价 ￥<span id="goods_count">'+goods_count+'</span>元 节省了 ￥<span id="save_price">'+difference+'</span>元');
      $.ajax({

          url:"{:url('shopcar/change')}",
          dataType:"json",
          data:{goods_number_44:goods_number_44,goods_id:goods_id},
          success:function(res){
            if (res) {
              console.log('成功')
            }

          }
      })

})
</script>

</html>